package com.qiche.service2;

import com.qiche.dto.MemberCardItemDto;
import com.qiche.model.Card2;
import com.qiche.model.Card2Example;
import com.qiche.model.User2;
import com.qiche.service.IService;

import java.util.List;
import java.util.Map;

/**
 * @author chendezhi
 * @date 2018/3/27 17:25
 */
public interface Card2Service extends IService<Card2> {
    Card2 selectActiveByCardId(Long cardId);

    /**
     * 通过手机号 查询 人保卡券
     *
     * @param memberPhone
     * @return
     */
    List<MemberCardItemDto> selectPiccByMemberPhone(String memberPhone, String sortMoney,String piccMid);

    Map<String,Object> writeOffPicc(String cardCode, String piccUid, String piccMid);


    Map<String, Object> isUsed(String cardcode, User2 loginUser, Long storeId);

    Card2 selectByCardCodeAndStatus(String cardCode, String status);

    Card2 selectCardWithMemberAndActivity(String cardCode, String status);

    List<Card2> selectCardAndMembersByExample(Card2Example example);


    Card2 selectCardAndMemberByCardCode(String cardcode);
    int batchInsert(List<Card2> cards);
}
